import {
	createWebHistory,
	createRouter
} from "vue-router";
import Layout from "@/layout";

/**
 * Note: 路由配置项
 *
 * hidden: true                     // 当设置 true 的时候该路由不会再侧边栏出现 如401，login等页面，或者如一些编辑页面/edit/1
 * alwaysShow: true                 // 当你一个路由下面的 children 声明的路由大于1个时，自动会变成嵌套的模式--如组件页面
 *                                  // 只有一个时，会将那个子路由当做根路由显示在侧边栏--如引导页面
 *                                  // 若你想不管路由下面的 children 声明的个数都显示你的根路由
 *                                  // 你可以设置 alwaysShow: true，这样它就会忽略之前定义的规则，一直显示根路由
 * redirect: noRedirect             // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
 * name:'router-name'               // 设定路由的名字，一定要填写不然使用<keep-alive>时会出现各种问题
 * query: '{"id": 1, "name": "ry"}' // 访问路由的默认传递参数
 * meta : {
    noCache: true                   // 如果设置为true，则不会被 <keep-alive> 缓存(默认 false)
    title: 'title'                  // 设置该路由在侧边栏和面包屑中展示的名字
    icon: 'svg-name'                // 设置该路由的图标，对应路径src/assets/icons/svg
    breadcrumb: false               // 如果设置为false，则不会在breadcrumb面包屑中显示
    activeMenu: '/system/user'      // 当路由设置了该属性，则会高亮相对应的侧边栏。
  }
 */

// 公共路由
export const constantRoutes = [{
		path: "/redirect",
		component: Layout,
		hidden: true,
		children: [{
			path: "/redirect/:path(.*)",
			component: () => import("@/views/redirect/index.vue"),
		}, ],
	},
	{
		path: "/login",
		component: () => import("@/views/login"),
		hidden: true,
	},
	{
		path: "/register",
		component: () => import("@/views/register"),
		hidden: true,
	},
	{
		path: "/:pathMatch(.*)*",
		component: () => import("@/views/error/404"),
		hidden: true,
	},
	{
		path: "/401",
		component: () => import("@/views/error/401"),
		hidden: true,
	},
	{
		path: "/",
		component: Layout,
		redirect: "/index",
		children: [{
			path: "index",
			component: () => import("@/views/index"),
			name: "Index",
			meta: {
				title: "首页",
				icon: "dashboard",
				affix: true
			},
		}, ],
	},
	{
		path: "/user",
		component: Layout,
		hidden: true,
		redirect: "noredirect",
		children: [{
			path: "profile",
			component: () => import("@/views/system/user/profile/index"),
			name: "Profile",
			meta: {
				title: "个人中心",
				icon: "user"
			},
		}, ],
	},
	{
		path: "/system/user-auth",
		component: Layout,
		hidden: true,
		children: [{
			path: "role/:userId(\\d+)",
			component: () => import("@/views/system/user/authRole"),
			name: "AuthRole",
			meta: {
				title: "分配角色",
				activeMenu: "/system/user"
			},
		}, ],
	},
	{
		path: "/system/role-auth",
		component: Layout,
		hidden: true,
		children: [{
			path: "user/:roleId(\\d+)",
			component: () => import("@/views/system/role/authUser"),
			name: "AuthUser",
			meta: {
				title: "分配用户",
				activeMenu: "/system/role"
			},
		}, ],
	},
	{
		path: "/system/dict-data",
		component: Layout,
		hidden: true,
		children: [{
			path: "index/:dictId(\\d+)",
			component: () => import("@/views/system/dict/data"),
			name: "Data",
			meta: {
				title: "字典数据",
				activeMenu: "/system/dict"
			},
		}, ],
	},
	{
		path: "/monitor/job-log",
		component: Layout,
		hidden: true,
		children: [{
			path: "index",
			component: () => import("@/views/monitor/job/log"),
			name: "JobLog",
			meta: {
				title: "调度日志",
				activeMenu: "/monitor/job"
			},
		}, ],
	},
	{
		path: "/tool/gen-edit",
		component: Layout,
		hidden: true,
		children: [{
			path: "index/:tableId(\\d+)",
			component: () => import("@/views/tool/gen/editTable"),
			name: "GenEdit",
			meta: {
				title: "修改生成配置",
				activeMenu: "/tool/gen"
			},
		}, ],
	},
	{
		path: "/essentialData",
		component: Layout,
		hidden: true,
		redirect: "noRedirect",
		meta: {
			title: "基础数据",
			icon: "essentialData"
		},
		children: [{
				path: "administrativeArea",
				component: () => import("@/views/essentialData/administrativeArea/index"),
				name: "administrativeArea",
				meta: {
					title: "行政区划",
					icon: "administrativeArea"
				},
			},
			{
				path: "dataView",
				component: () => import("@/views/essentialData/dataView/index"),
				name: "dataView",
				meta: {
					title: "数据视图",
					icon: "dataView"
				},
			},
			{
				path: "basicGeography",
				component: () => import("@/views/essentialData/basicGeography/index"),
				name: "basicGeography",
				meta: {
					title: "基础地理",
					icon: "basicGeography"
				},
			},
			{
				path: "earthquakeGeology",
				component: () => import("@/views/essentialData/earthquakeGeology/index"),
				name: "earthquakeGeology",
				meta: {
					title: "地震、地质及区划",
					icon: "earthquakeGeology"
				},
			},
			{
				path: "historyDamage",
				component: () => import("@/views/essentialData/historyDamage/index"),
				name: "historyDamage",
				meta: {
					title: "历史震害",
					icon: "historyDamage"
				},
			},
			{
				path: "secondarySource",
				component: () => import("@/views/essentialData/secondarySource/index"),
				name: "secondarySource",
				meta: {
					title: "次生灾害源",
					icon: "secondarySource"
				},
			},
			{
				path: "contingencyReserve",
				component: () => import("@/views/essentialData/contingencyReserve/index"),
				name: "contingencyReserve",
				meta: {
					title: "应急准备",
					icon: "contingencyReserve"
				},
			},
			{
				path: "importantGoal",
				component: () => import("@/views/essentialData/importantGoal/index"),
				name: "importantGoal",
				meta: {
					title: "重要目标",
					icon: "importantGoal"
				},
			},
			{
				path: "majorProject",
				component: () => import("@/views/essentialData/majorProject/index"),
				name: "majorProject",
				meta: {
					title: "重大工程设施",
					icon: "majorProject"
				},
			}, {
				path: "house",
				component: () => import("@/views/essentialData/house/index"),
				name: "house",
				meta: {
					title: "房屋",
					icon: "house"
				},
			}, {
				path: "traffic",
				component: () => import("@/views/essentialData/traffic/index"),
				name: "traffic",
				meta: {
					title: "交通",
					icon: "traffic"
				},
			}, {
				path: "population",
				component: () => import("@/views/essentialData/population/index"),
				name: "population",
				meta: {
					title: "人口",
					icon: "population"
				},
			}, {
				path: "economics",
				component: () => import("@/views/essentialData/economics/index"),
				name: "economics",
				meta: {
					title: "经济",
					icon: "economics"
				},
			},
		],
	},
];

// 动态路由，基于用户权限动态去加载
export const dynamicRoutes = [
	/*
	//承灾体易损性管理-->易损性模型库管理
	{
		path: "/disasterVulnerManagement",
		component: Layout,
		hidden: true,
		meta: {
			title: "承灾体易损性管理",
			icon: "disasterVulnerManagement"
		},
		children: [{
				path: "vulnerDataMaintenance",
				component: () => import("@/views/disasterVulnerManagement/vulnerDataMaintenance/main"),
				name: "vulnerDataMaintenance",
				meta: {
					title: "易损性数据维护",
					icon: "vulnerDataMaintenance",
				},
				children: [{
						path: 'vulnerDataImport',
						component: () => import(
							"@/views/disasterVulnerManagement/vulnerDataMaintenance/vulnerModelFile/vulnerDataImport"
						),
						name: "vulnerDataImport",
						meta: {
							title: "承灾体易损性数据导入",
							icon: "vulnerDataImport",
						},
					},
					{
						path: 'vulnerDataSort',
						component: () => import(
							"@/views/disasterVulnerManagement/vulnerDataMaintenance/vulnerModelFile/vulnerDataSort"
						),
						name: "vulnerDataSort",
						meta: {
							title: "易损性数据排序",
							icon: "vulnerDataSort",
						},
					},
				]
			},

			{
				path: "compreVisualAnalysis",
				component: () => import("@/views/disasterVulnerManagement/compreVisualAnalysis/main"),
				name: "compreVisualAnalysis",
				meta: {
					title: "综合可视化分析",
					icon: "compreVisualAnalysis",
				},
				children: [{
						path: 'buildingCompreSta',
						component: () => import(
							"@/views/disasterVulnerManagement/compreVisualAnalysis/vulnerModelFile/buildingCompreSta"
						),
						name: "buildingCompreSta",
						meta: {
							title: "建筑物易损性综合统计",
							icon: "buildingCompreSta",
						},
					},
					{
						path: 'lifelineCompreSta',
						component: () => import(
							"@/views/disasterVulnerManagement/compreVisualAnalysis/vulnerModelFile/lifelineCompreSta"
						),
						name: "lifelineCompreSta",
						meta: {
							title: "生命线工程易损性综合统计",
							icon: "lifelineCompreSta",
						},

					},
					{
						path: 'majorCompreSta',
						component: () => import(
							"@/views/disasterVulnerManagement/compreVisualAnalysis/vulnerModelFile/majorCompreSta"
						),
						name: "majorCompreSta",
						meta: {
							title: "重大工程设施易损性综合统计",
							icon: "majorCompreSta",
						},
					},
					{
						path: 'spatialDisSta',
						component: () => import(
							"@/views/disasterVulnerManagement/compreVisualAnalysis/vulnerModelFile/spatialDisSta"
						),
						name: "spatialDisSta",
						meta: {
							title: "易损性数据空间分布统计",
							icon: "spatialDisSta",
						},
					},
					{
						path: 'thematicMapAnalysis',
						component: () => import(
							"@/views/disasterVulnerManagement/compreVisualAnalysis/vulnerModelFile/thematicMapAnalysis"
						),
						name: "thematicMapAnalysis",
						meta: {
							title: "专题图分析",
							icon: "thematicMapAnalysis",
						},
					},
				]
			},

			{
				path: "vulnerModelManagement",
				component: () => import("@/views/disasterVulnerManagement/vulnerModelManagement/main"),
				name: "vulnerModelManagement",
				meta: {
					title: "易损性模型库管理",
					icon: "vulnerModelManagement",
				},
				children: [{
						path: 'brickMasonryRelation',
						component: () => import(
							"@/views/disasterVulnerManagement/vulnerModelManagement/vulnerModelFile/brickMasonryRelation"
						),
						name: "brickMasonryRelation",
						meta: {
							title: "砖砌体结构抗力修正系数对应关系",
							icon: "brickMasonryRelation",
						},
					},
					{
						path: 'reinforcedConcrete',
						component: () => import(
							"@/views/disasterVulnerManagement/vulnerModelManagement/vulnerModelFile/reinforcedConcrete"
						),
						name: "reinforcedConcrete",
						meta: {
							title: "钢筋混凝土结构相关系数",
							icon: "reinforcedConcrete",
						},
					},
					{
						path: 'earthquakeDamageGrade',
						component: () => import(
							"@/views/disasterVulnerManagement/vulnerModelManagement/vulnerModelFile/earthquakeDamageGrade"
						),
						name: "earthquakeDamageGrade",
						meta: {
							title: "震害等级对应的震害指数的中值和上下限",
							icon: "earthquakeDamageGrade",
						},
					},
					{
						path: 'highriseManagement',
						component: () => import(
							"@/views/disasterVulnerManagement/vulnerModelManagement/vulnerModelFile/highriseManagement"
						),
						name: "highriseManagement",
						meta: {
							title: "高层结构层间位移角限值管理",
							icon: "highriseManagement",
						},
					},
					{
						path: 'roadCalParameterMaintenance',
						component: () => import(
							"@/views/disasterVulnerManagement/vulnerModelManagement/vulnerModelFile/roadCalParameterMaintenance"
						),
						name: "roadCalParameterMaintenance",
						meta: {
							title: "道路计算参数值维护",
							icon: "roadCalParameterMaintenance",
						},
					},
					{
						path: 'bridgeCalParameterMaintenance',
						component: () => import(
							"@/views/disasterVulnerManagement/vulnerModelManagement/vulnerModelFile/bridgeCalParameterMaintenance"
						),
						name: "bridgeCalParameterMaintenance",
						meta: {
							title: "桥梁计算参数值维护",
							icon: "bridgeCalParameterMaintenance",
						},

					},
					{
						path: 'waterSupplyMaintenance',
						component: () => import(
							"@/views/disasterVulnerManagement/vulnerModelManagement/vulnerModelFile/waterSupplyMaintenance"
						),
						name: "waterSupplyMaintenance",
						meta: {
							title: "供水设施系数维护",
							icon: "waterSupplyMaintenance",
						},
					},
					{
						path: 'undergroundMaintenance',
						component: () => import(
							"@/views/disasterVulnerManagement/vulnerModelManagement/vulnerModelFile/undergroundMaintenance"
						),
						name: "undergroundMaintenance",
						meta: {
							title: "地下管网相关系数维护",
							icon: "undergroundMaintenance",
						},
					},
					{
						path: 'equipmentCommuMaintenance',
						component: () => import(
							"@/views/disasterVulnerManagement/vulnerModelManagement/vulnerModelFile/equipmentCommuMaintenance"
						),
						name: "equipmentCommuMaintenance",
						meta: {
							title: "通讯设备系数维护",
							icon: "equipmentCommuMaintenance",
						},
					},
				]
			},
		],
	},

	//承灾体数据管理-->数据导入
	{
		path: "/disasterDataManagement",
		component: Layout,
		hidden: true,
		meta: {
			title: "承灾体数据管理",
			icon: "disasterDataManagement"
		},
		children: [{
				path: "importData",
				component: () => import("@/views/disasterDataManagement/importData/main"),
				name: "importData",
				meta: {
					title: "数据导入",
					icon: "importData",
				},
				children: [{
						path: 'buildingAreaInfo',
						component: () => import(
							"@/views/disasterDataManagement/importData/buildingAreaInfo"),
						name: "buildingAreaInfo",
						meta: {
							title: "建筑物区域特征信息",
							icon: "buildingAreaInfo",
						},
					},
					{
						path: 'buildingDamageData',
						component: () => import(
							"@/views/disasterDataManagement/importData/buildingDamageData"),
						name: "buildingDamageData",
						meta: {
							title: "建筑物震害数据",
							icon: "buildingDamageData",
						},
					},
					{
						path: 'lifelineSystemData',
						component: () => import(
							"@/views/disasterDataManagement/importData/lifelineSystemData"),
						name: "lifelineSystemData",
						meta: {
							title: "生命线系统数据",
							icon: "lifelineSystemData",
						},
					},
					{
						path: 'majorEngineerFac',
						component: () => import(
							"@/views/disasterDataManagement/importData/majorEngineerFac"),
						name: "majorEngineerFac",
						meta: {
							title: "重大工程设施数据",
							icon: "majorEngineerFac",
						},
					}
				]
			},



			{
				path: "maintainData",
				component: () => import("@/views/disasterDataManagement/maintainData/main"),
				name: "maintainData",
				meta: {
					title: "数据维护",
					icon: "maintainData",
				},
				children: [{
						path: 'buildingAreaInfoMain',
						component: () => import(
							"@/views/disasterDataManagement/maintainData/buildingAreaInfoMain"
						),
						name: "buildingAreaInfoMain",
						meta: {
							title: "建筑物区域特征信息维护",
							icon: "buildingAreaInfoMain",
						},
					},
					{
						path: 'buildingAreaInfoDetail',
						component: () => import(
							"@/views/disasterDataManagement/maintainData/buildingAreaInfoDetail"
						),
						name: "buildingAreaInfoDetail",
						meta: {
							title: "建筑物区域特征信息详情",
							icon: "buildingAreaInfoDetail",
						},
					},
					{
						path: 'buildingDamageInfo',
						component: () => import(
							"@/views/disasterDataManagement/maintainData/buildingDamageInfo"),
						name: "buildingDamageInfo",
						meta: {
							title: "建筑物震害信息",
							icon: "buildingDamageInfo",
						},
					},
					{
						path: 'buildVulnerabilityInfo',
						component: () => import(
							"@/views/disasterDataManagement/maintainData/buildVulnerabilityInfo"
						),
						name: "buildVulnerabilityInfo",
						meta: {
							title: "详细信息界面",
							icon: "buildVulnerabilityInfo",
						},
					},
					{
						path: 'lifelineSystemInfo',
						component: () => import(
							"@/views/disasterDataManagement/maintainData/lifelineSystemInfo"),
						name: "lifelineSystemInfo",
						meta: {
							title: "生命线工程属性信息",
							icon: "lifelineSystemInfo",
						},
					},
					{
						path: 'majorEngineerFacInfo',
						component: () => import(
							"@/views/disasterDataManagement/maintainData/majorEngineerFacInfo"
						),
						name: "majorEngineerFacInfo",
						meta: {
							title: "重大工程设施属性信息",
							icon: "majorEngineerFacInfo",
						},
					}
				]
			},
		],
	},

	//生命线工程易损性分析
	{
		path: "/lifelineVulnerAnalysis",
		component: Layout,
		hidden: true,
		meta: {
			title: "生命线工程易损性分析",
			icon: "lifelineVulnerAnalysis"
		},
		children: [{
				path: "underPipeNet",
				component: () => import("@/views/lifelineVulnerAnalysis/underPipeNet/main"),
				name: "underPipeNet",
				meta: {
					title: "地下管网易损性分析与管理",
					icon: "underPipeNet",
				},
				children: [{
						path: 'simpleCorrModel',
						component: () => import(
							"@/views/lifelineVulnerAnalysis/underPipeNet/simpleCorrModel"),
						name: "simpleCorrModel",
						meta: {
							title: "简单对应的模型",
							icon: "simpleCorrModel",
						},
					},
					{
						path: 'continWeldPipe',
						component: () => import(
							"@/views/lifelineVulnerAnalysis/underPipeNet/continWeldPipe"),
						name: "continWeldPipe",
						meta: {
							title: "复杂计算的模型-连续焊接管道分析方法",
							icon: "continWeldPipe",
						},
					},
					{
						path: 'interfacePipe',
						component: () => import(
							"@/views/lifelineVulnerAnalysis/underPipeNet/interfacePipe"),
						name: "interfacePipe",
						meta: {
							title: "复杂计算的模型-接口式管道分析方法",
							icon: "interfacePipe",
						},
					},
				]
			},


			{
				path: "waterSupply",
				component: () => import("@/views/lifelineVulnerAnalysis/lifelineFile/waterSupply"),
				name: "waterSupply",
				meta: {
					title: "供水设施易损性分析与管理",
					icon: "waterSupply",
				},
			},
			{
				path: "gasSupply",
				component: () => import("@/views/lifelineVulnerAnalysis/lifelineFile/gasSupply"),
				name: "gasSupply",
				meta: {
					title: "供气设施易损性分析与管理",
					icon: "gasSupply",
				},
			},
			{
				path: "lifelineMain",
				component: () => import("@/views/lifelineVulnerAnalysis/lifelineFile/index"),
				name: "lifelineMain",
				meta: {
					title: "生命线工程易损性查询",
					icon: "lifelineMain",
				},
			},


			{
				path: "bridgeVulnerCalc",
				component: () => import("@/views/lifelineVulnerAnalysis/lifelineFile/bridgeVulnerCalc"),
				name: "bridgeVulnerCalc",
				meta: {
					title: "桥梁易损性计算与分析",
					icon: "bridgeVulnerCalc",
				},
			},
			{
				path: "roadVulnerCalc",
				component: () => import("@/views/lifelineVulnerAnalysis/lifelineFile/roadVulnerCalc"),
				name: "roadVulnerCalc",
				meta: {
					title: "道路易损性计算与分析",
					icon: "roadVulnerCalc",
				},
			},
			{
				path: 'singleDataCalcProcess',
				component: () => import("@/views/lifelineVulnerAnalysis/lifelineFile/singleDataCalcProcess"),
				name: "singleDataCalcProcess",
				meta: {
					title: "单条数据查询计算过程",
					icon: "singleDataCalcProcess",
				},
			},
			{
				path: "subVulner",
				component: () => import("@/views/lifelineVulnerAnalysis/lifelineFile/subVulner"),
				name: "subVulner",
				meta: {
					title: "变电站易损性分析与管理",
					icon: "subVulner",
				},
			},
			{
				path: "powerSupplyVulner",
				component: () => import("@/views/lifelineVulnerAnalysis/lifelineFile/powerSupplyVulner"),
				name: "powerSupplyVulner",
				meta: {
					title: "供电设备易损性分析与管理",
					icon: "powerSupplyVulner",
				},
			},
			{
				path: "comEquiVulner",
				component: () => import("@/views/lifelineVulnerAnalysis/lifelineFile/comEquiVulner"),
				name: "comEquiVulner",
				meta: {
					title: "通信设备易损性分析与管理",
					icon: "comEquiVulner",
				},
			}
		],
	},
	//重大工程设施易损性分析、
	{
		path: "/majorEnginVulnerAnalysis",
		component: Layout,
		hidden: true,
		meta: {
			title: "重大工程设施易损性分析",
			icon: "majorEnginVulnerAnalysis"
		},
		children: [{
				path: "majorProjectData",
				component: () => import(
					"@/views/majorEnginVulnerAnalysis/majorEnginFile/majorProjectData/main"),
				name: "majorProjectData",
				meta: {
					title: "重大工程历史震害数据",
					icon: "majorProjectData",
				},
				children: [{
						path: 'inquire',
						component: () => import(
							"@/views/majorEnginVulnerAnalysis/majorEnginFile/majorProjectData/inquire"
						),
						name: "inquire",
						meta: {
							title: "重大工程历史震害数据查询",
							icon: "inquire",
						},
					},
					{
						path: 'import',
						component: () => import(
							"@/views/majorEnginVulnerAnalysis/majorEnginFile/majorProjectData/import"
						),
						name: "import",
						meta: {
							title: "历史震害数据的导入",
							icon: "import",
						},
					},
				]
			},
			{
				path: "pipelineVulnerManagement",
				component: () => import(
					"@/views/majorEnginVulnerAnalysis/majorEnginFile/pipelineVulnerManagement"),
				name: "pipelineVulnerManagement",
				meta: {
					title: "输油/气管线易损性管理",
					icon: "pipelineVulnerManagement",
				},
			},
			{
				path: "nuclearPowerVulnerManagement",
				component: () => import(
					"@/views/majorEnginVulnerAnalysis/majorEnginFile/nuclearPowerVulnerManagement"),
				name: "nuclearPowerVulnerManagement",
				meta: {
					title: "核电站易损性管理",
					icon: "nuclearPowerVulnerManagement",
				},
			},
			{
				path: "reservoirDamVulnerManagement",
				component: () => import(
					"@/views/majorEnginVulnerAnalysis/majorEnginFile/reservoirDamVulnerManagement"),
				name: "reservoirDamVulnerManagement",
				meta: {
					title: "水库大坝易损性管理",
					icon: "reservoirDamVulnerManagement",
				},
			},
			{
				path: "otherMajorVulnerManagement",
				component: () => import(
					"@/views/majorEnginVulnerAnalysis/majorEnginFile/otherMajorVulnerManagement"),
				name: "otherMajorVulnerManagement",
				meta: {
					title: "其他重大工程设施易损性管理",
					icon: "otherMajorVulnerManagement",
				},
			},
			{
				path: "majorEnginInquire",
				component: () => import("@/views/majorEnginVulnerAnalysis/majorEnginFile/majorEnginInquire"),
				name: "majorEnginInquire",
				meta: {
					title: "重大工程设施易损性分析查询",
					icon: "majorEnginInquire",
				},
			},
		],
	},

	// 建筑物结构易损性分析
	{
		path: "/buildingVulnerAnalysis",
		component: Layout,
		hidden: true,
		meta: {
			title: "建筑物结构易损性分析",
			icon: ""
		},
		children: [
			{
				path: "statisticalAnalysis",
				component: () => import("@/views/buildingVulnerAnalysis/statisticalAnalysis/main"),
				name: "statisticalAnalysis",
				meta: {
					title: "统计易损性分析",
					icon: "",
				},
				children: [
					{
						path: "list",
						component: () => import("@/views/buildingVulnerAnalysis/statisticalAnalysis/list"),
						name: "statisticalVulnerAnalysis",
						meta: {
							title: "震害统计易损性分析",
							icon: "",
						},
					},
					{
						path: "info",
						component: () => import("@/views/buildingVulnerAnalysis/statisticalAnalysis/info"),
						name: "buildingVulnerAnalysisInfo",
						meta: {
							title: "建筑物结构易损性详情",
							icon: "",
						},
					},
					{
						path: "highriseBuildingState",
						component: () => import("@/views/buildingVulnerAnalysis/statisticalAnalysis/highriseBuildingState/main"),
						name: "highriseBuildingState",
						redirect: '/buildingVulnerAnalysis/statisticalAnalysis/highriseBuildingState/highriseInquire',
						meta: {
							title: "高层建筑破坏状态",
							icon: "",
						},
						children: [{
								path: 'highriseInquire',
								component: () => import("@/views/buildingVulnerAnalysis/statisticalAnalysis/highriseBuildingState/highriseInquire"),
								name: "highriseInquire",
								meta: {
									title: "查询界面",
									icon: "",
								},
							},
							{
								path: 'highriseDetailsInterface',
								component: () => import("@/views/buildingVulnerAnalysis/statisticalAnalysis/highriseBuildingState/detailsInterface"),
								name: "highriseDetailsInterface",
								meta: {
									title: "模型计算详情界面",
									icon: "",
								},
							},
						]
					},
					{
						path: "reinforcedState",
						component: () => import("@/views/buildingVulnerAnalysis/statisticalAnalysis/reinforcedState/main"),
						name: "reinforcedState",
						redirect: '/buildingVulnerAnalysis/statisticalAnalysis/reinforcedState/reinforcedInquire',
						meta: {
							title: "钢筋混凝土结构破坏状态",
							icon: "",
						},
						children: [{
								path: 'reinforcedInquire',
								component: () => import("@/views/buildingVulnerAnalysis/statisticalAnalysis/reinforcedState/reinforcedInquire"),
								name: "reinforcedInquire",
								meta: {
									title: "查询界面",
									icon: "",
								},
							},
							{
								path: 'reinforcedDetailsInterface',
								component: () => import("@/views/buildingVulnerAnalysis/statisticalAnalysis/reinforcedState/detailsInterface"),
								name: "reinforcedDetailsInterface",
								meta: {
									title: "模型计算详情界面",
									icon: "",
								},
							},
						]
					},
					{
						path: "brickState",
						component: () => import("@/views/buildingVulnerAnalysis/statisticalAnalysis/brickState/main"),
						name: "brickState",
						redirect: '/buildingVulnerAnalysis/statisticalAnalysis/brickState/brickInquire',
						meta: {
							title: "砖混结构破坏状态",
							icon: "",
						},
						children: [{
								path: 'brickInquire',
								component: () => import("@/views/buildingVulnerAnalysis/statisticalAnalysis/brickState/brickInquire"),
								name: "brickInquire",
								meta: {
									title: "查询界面",
									icon: "",
								},
							},
							{
								path: 'brickDetailsInterface',
								component: () => import("@/views/buildingVulnerAnalysis/statisticalAnalysis/brickState/detailsInterface"),
								name: "brickDetailsInterface",
								meta: {
									title: "模型详情界面",
									icon: "",
								},
							},
						]
					},
				]
			},
			{
				path: "seismicVulnerAnalysis",
				component: () => import("@/views/buildingVulnerAnalysis/seismicVulnerAnalysis/main"),
				name: "seismicVulnerAnalysis",
				redirect: '/buildingVulnerAnalysis/seismicVulnerAnalysis/seismicInquire',
				meta: {
					title: "概率地震易损性分析",
					icon: "",
				},
				children: [{
						path: 'seismicInquire',
						component: () => import("@/views/buildingVulnerAnalysis/seismicVulnerAnalysis/seismicInquire"),
						name: "seismicInquire",
						meta: {
							title: "查询界面",
							icon: "",
						},
					},
					{
						path: 'seismicDetailsInterface',
						component: () => import("@/views/buildingVulnerAnalysis/seismicVulnerAnalysis/detailsInterface"),
						name: "seismicDetailsInterface",
						meta: {
							title: "详细信息界面及导入数据界面",
							icon: "",
						},
					},
				]
			},
		],
	},
	*/

	// {
	// 	path: "statisticalAnalysis",
	// 	component: () => import("@/views/buildingVulnerAnalysis/statisticalAnalysis/main"),
	// 	name: "statisticalAnalysis",
	// 	meta: {
	// 		title: "统计易损性分析",
	// 		icon: "",
	// 	},
	// 	children: [
	// 		{
	// 			path: "info",
	// 			component: () => import("@/views/buildingVulnerAnalysis/statisticalAnalysis/info"),
	// 			name: "buildingVulnerAnalysisInfo",
	// 			meta: {
	// 				title: "建筑物结构易损性详情",
	// 				icon: "",
	// 			},
	// 		},
	// 	]
	// }
]

// console.log("根路由：" + import.meta.env.VITE_APP_ROUTE);
const router = createRouter({
	history: createWebHistory(import.meta.env.VITE_APP_ROUTE),
	routes: constantRoutes,
	scrollBehavior(to, from, savedPosition) {
		if (savedPosition) {
			return savedPosition;
		} else {
			return {
				top: 0
			};
		}
	},
});

export default router;
